count number of spaces in string